package novel.spider.test;
import java.util.List;

import org.junit.Test;

import novel.spider.entity.Chapter;
import novel.spider.enums.NovelSiteEnum;
import novel.spider.face.IChapterSpider;
import novel.spider.impl.DefaultChapterSpider;
import novel.spider.util.NovelSpiderUtil;
//http://www.xs.la/0_5/ #list dd a utf-8 笔趣阁
//http://www.x23us.com/html/54/54322/ #at td a gbk
public class testCrawl {
	@Test
	public void test1() throws Exception{
		IChapterSpider spider = new DefaultChapterSpider();
		List<Chapter> getsChapter = spider.getsChapter("http://zzuisa.cn/NewsJWPro/index");
		for(Chapter chapter : getsChapter){
			System.out.println(chapter);
		}
	}
	public void textGetSiteContext(){
		System.out.println(NovelSpiderUtil.getContext(NovelSiteEnum.getEnumByUrl("http://www.x23us.com/html/54/54322/")));
	}
}
